<?php
define('DS', DIRECTORY_SEPARATOR);

// Define path to applications directory
define('APPLICATIONS_PATH', realpath(dirname(__FILE__) . '/../applications'));

define('LIBRARIES_PATH', realpath(dirname(__FILE__) . '/../libraries'));

// Define application environment
defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    LIBRARIES_PATH,
    APPLICATIONS_PATH
)));

require_once 'Hydrum.php';

spl_autoload_register(array('Hydrum', 'autoload'));

Hydrum::run($_SERVER['HTTP_HOST']);
